package com.sky.mapper;

import com.sky.entity.DishFlavor;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface DishFlavorMapper {
    //新增菜品(day03任务二)
    void insertBatch(@Param("flavors") List<DishFlavor> flavors);
    // 修改菜品(day03任务5)
    @Delete("delete from dish_flavor where dish_id =#{id}")
    void deleteByDishId(Long id);
    @Select("select * from dish_flavor where dish_id =#{id}")
    List<DishFlavor> selectByDishId(Long id);
    //导入商品浏览功能代码(day06任务四)
    @Select("select * from dish_flavor where dish_id = #{id}")
    List<DishFlavor> getByDishId(Long id);

}
